import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询场站列表
export function listStation(query) {
  return request({
    url: '/system/station/list',
    method: 'get',
    params: query
  })
}

// 查询场站详细
export function getStationDetail(id) {
  return request({
    url: '/system/station/detail?id=' + id,
    method: 'get'
  })
}

// 新增场站
export function addStation(data) {
  return request({
    url: '/system/station/add',
    method: 'post',
    data: data
  })
}

// 修改场站
export function updateStation(data) {
  return request({
    url: '/system/station/update',
    method: 'post',
    data: data
  })
}

// 删除场站
export function delStation(id) {
  return request({
    url: '/system/station/remove?id=' + id,
    method: 'get'
  })
}

// 删除场站
export function batchDelStation(ids) {
  const params = {
    'ids' : ids
  }
  return request({
    url: '/system/station/batchRemove',
    method: 'post',
    data: params
  })
}

// 场站状态修改
export function changeStationStatus(id, enable) {
  const data = {
    id,
    enable
  }
  return request({
    url: '/system/station/changeStatus',
    method: 'post',
    data: data
  })
}



